<template>
  <div class="my-title">
    <div class="df" style="justify-content: space-between">
      <div class="lfet-bar df">
        <div class="bar"></div>
        <h3>{{ titleName }}</h3>
      </div>
      <div class="more f14 curr" v-if="isMore" @click="handleLookMore">
        更多
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  titleName: {
    type: String,
    default: '',
  },
  isMore: {
    type: Boolean,
    default: false,
  },
  type: {
    type: Number,
    default: 0,
  },
  skipRou: {
    type: Object,
    default: () => ({}),
  },
});
import { useRouter } from 'vue-router';
const router = useRouter();

const handleLookMore = () => {
  if (!props.type) {
    return;
  } else {
    router.push({
      path: props.skipRou.url,
      query: { collegecode: props.skipRou.collegecode },
    });
  }
};
</script>

<style lang="scss" scoped>
.my-title {
  margin: 20px 0;
  .lfet-bar {
    .bar {
      width: 3px;
      height: 30px;
      margin-right: 7px;
      background: var(--color-text);
    }
  }
  .more {
    color: var(--color-text);
  }
}
</style>
